#include <stdio.h>

int main()
{
	int x;
	float y;
	scanf("%d",&x);
	if(x<1)
	{
		y=(float)x;
		printf("%.2f",y);	
	}
	else if(1<=x && x<10)
	{
		y=2.0*x-1.0;
		printf("%.2f",y);		
	}
	else
	{
		y=3.0*x-11.0;
		printf("%.2f",y);	
	}
	return 0;
}